home *** CD-ROM | disk | FTP | other *** search
/ Megahits 5 / Megahits 5 (1994)(GTI - Rhein-Main-Soft)(DE)(Disc 2 of 2)[!].iso / archive / show / superview_lib6_3.lha / superview-lib / Docs / SVSupport-Docs / ControlPad.doc next >
Text File  |  1994-06-06  |  3KB  |  87 lines

  1.  
  2.   The ControlPad-FileFormat (5.6.94)
  3.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4.   In the future, more and more SVObjects and SVDrivers will have to
  5.   handle globally set preferences, which might be handled and modified
  6.   via custom programs or SuperViewPrefs.
  7.  
  8.   To prevent multiple different ways of storing these preferences
  9.   data, I felt that this is the right time to introduce a standard
  10.   FileFormat for such configuration files : The ControlPad-FileFormat
  11.   (please read the notes under "Style Guide" below).
  12.  
  13.    - To allow easy reading and understanding of these Files, they are
  14.      stored in plain ASCII
  15.    - To prevent people from learning just another technique of configuring
  16.      files, they are constructed just like a kind of "Tooltype-Lists"
  17.    - a single ControlPad takes a full line of the File
  18.      and looks like that : <Name>=<Content> or <Keyword>
  19.      Content and Name may contain any ASCII characters except "=", because
  20.      the first "=", which is found, is used to divide the Name from the
  21.      Content in the line. A Keyword is anything, which does not contain
  22.      a "=" somwhere, but is not a comment.
  23.    - So all other special characters are possible (although you should
  24.      not make too much use of them for ergonomical reasons).
  25.    - it is supported to write as much comments to the files, as wished.
  26.      A comment line has to begin with "/" or ";" in its first column.
  27.      A totally blank line fits to the same category as "/" or ";" lines.
  28.  
  29.  
  30.   Additional Notes
  31.   ~~~~~~~~~~~~~~~~
  32.   * Note, that comments are totally ignored by the Library functions, when
  33.     reading ControlPad-Files, and writing of comments is not supported.
  34.  
  35.     So do not add too much comments to your files, but on the other and,
  36.     explain all of the Switches (and their default values) inside the
  37.     Doc-Files of your program to prevent a lack of information !
  38.  
  39.   * The SVSUP_FindControlPad() function is case-sensitive !
  40.  
  41.  
  42.   "Style Guide"
  43.   ~~~~~~~~~~~~~
  44.   Common "style guide" rules (PLEASE NOTE) :
  45.  
  46.    - ControlPads should be located in "ENV:superview-library/"
  47.      and have the plain name of the SVDriver/SVObject/... plus
  48.      ".controlpad" as extension.
  49.      For Example a ControlPad for JPEG.svobject should be
  50.      named "ENV:superview-library/JPEG.controlpad".
  51.    - for boolean entries use <YES/NO> choices, not <TRUE/FALSE>
  52.      or just set single Keywords like "USE_..."
  53.    - use pregnant names for multiple-choices, like
  54.      <HUFF/LWZ/ENTROPY>, not <1/2/3>
  55.    - use short names and statements, not long and complicated ones :
  56.      "ColorDepth=8" instead of "Number_of_Colors=16.7_million"
  57.  
  58.  
  59.   Examples
  60.   ~~~~~~~~
  61.   In "Programmers/Example_Tools/ControlPadDemo" you find an example
  62.   Source, which deals with ControlPads and explains anything you need
  63.   to make use of them.
  64.  
  65.   In addition to the supplied example Files there and to the SourceCode,
  66.   now an example of constructing a ControlPad-File (>>> marks the beginning
  67.   and <<< the end : both are not part of the file) :
  68.  
  69.  
  70.   FileName : e.g. JPEG.svobject
  71.  
  72. >>>
  73. /* Set the Input/Output ColorDepth for JPEG encoding/decoding (8/24) : */
  74. COLORDEPTH=8
  75.  
  76. /* Show thumbnails, so that the main picture may be dropped ? */
  77. THUMBNAIL=yes
  78.  
  79. /* How should the written data be encoded ? */
  80. ENCODING=HUFF
  81.  
  82. /* Switch temporary directory */
  83. USE_JPEGTMP
  84. <<<
  85.  
  86.  
  87.